package com.frp.protocol;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/**
 * 新建代理消息
 */
public class NewProxyMessage extends Message {
    @JsonProperty("proxy_name")
    private String proxyName;
    
    @JsonProperty("proxy_type")
    private String proxyType;  // tcp, udp, http, https
    
    @JsonProperty("use_encryption")
    private boolean useEncryption;
    
    @JsonProperty("use_compression")
    private boolean useCompression;
    
    @JsonProperty("group")
    private String group;
    
    @JsonProperty("group_key")
    private String groupKey;
    
    @JsonProperty("custom_domains")
    private String[] customDomains;
    
    @JsonProperty("subdomain")
    private String subdomain;
    
    @JsonProperty("locations")
    private String[] locations;
    
    @JsonProperty("http_user")
    private String httpUser;
    
    @JsonProperty("http_pwd")
    private String httpPwd;
    
    @JsonProperty("host_header_rewrite")
    private String hostHeaderRewrite;
    
    @JsonProperty("headers")
    private Map<String, String> headers;
    
    @JsonProperty("local_ip")
    private String localIp;
    
    @JsonProperty("local_port")
    private int localPort;
    
    @JsonProperty("remote_port")
    private int remotePort;
    
    @JsonProperty("plugin")
    private String plugin;
    
    @JsonProperty("plugin_params")
    private Map<String, String> pluginParams;
    
    public NewProxyMessage() {
        super(MessageType.NewProxy);
    }
    
    public NewProxyMessage(String proxyName, String proxyType, String localIp, 
                          int localPort, int remotePort) {
        super(MessageType.NewProxy);
        this.proxyName = proxyName;
        this.proxyType = proxyType;
        this.localIp = localIp;
        this.localPort = localPort;
        this.remotePort = remotePort;
    }
    
    // Getters and Setters
    public String getProxyName() { return proxyName; }
    public void setProxyName(String proxyName) { this.proxyName = proxyName; }
    
    public String getProxyType() { return proxyType; }
    public void setProxyType(String proxyType) { this.proxyType = proxyType; }
    
    public boolean isUseEncryption() { return useEncryption; }
    public void setUseEncryption(boolean useEncryption) { this.useEncryption = useEncryption; }
    
    public boolean isUseCompression() { return useCompression; }
    public void setUseCompression(boolean useCompression) { this.useCompression = useCompression; }
    
    public String getGroup() { return group; }
    public void setGroup(String group) { this.group = group; }
    
    public String getGroupKey() { return groupKey; }
    public void setGroupKey(String groupKey) { this.groupKey = groupKey; }
    
    public String[] getCustomDomains() { return customDomains; }
    public void setCustomDomains(String[] customDomains) { this.customDomains = customDomains; }
    
    public String getSubdomain() { return subdomain; }
    public void setSubdomain(String subdomain) { this.subdomain = subdomain; }
    
    public String[] getLocations() { return locations; }
    public void setLocations(String[] locations) { this.locations = locations; }
    
    public String getHttpUser() { return httpUser; }
    public void setHttpUser(String httpUser) { this.httpUser = httpUser; }
    
    public String getHttpPwd() { return httpPwd; }
    public void setHttpPwd(String httpPwd) { this.httpPwd = httpPwd; }
    
    public String getHostHeaderRewrite() { return hostHeaderRewrite; }
    public void setHostHeaderRewrite(String hostHeaderRewrite) { this.hostHeaderRewrite = hostHeaderRewrite; }
    
    public Map<String, String> getHeaders() { return headers; }
    public void setHeaders(Map<String, String> headers) { this.headers = headers; }
    
    public String getLocalIp() { return localIp; }
    public void setLocalIp(String localIp) { this.localIp = localIp; }
    
    public int getLocalPort() { return localPort; }
    public void setLocalPort(int localPort) { this.localPort = localPort; }
    
    public int getRemotePort() { return remotePort; }
    public void setRemotePort(int remotePort) { this.remotePort = remotePort; }
    
    public String getPlugin() { return plugin; }
    public void setPlugin(String plugin) { this.plugin = plugin; }
    
    public Map<String, String> getPluginParams() { return pluginParams; }
    public void setPluginParams(Map<String, String> pluginParams) { this.pluginParams = pluginParams; }
}